<?php
namespace Admin\Model;
use Think\Model;
class BrandModel extends Model {

		protected $_validate = array(
				array('brand_name','require','品牌名称不得为空！',1), //默认情况下用正则进行验证
		);
		
		
		
		public function _before_delete($datas){
			
			$id=$datas['where']['id'];
			$this->field('brand_logo')->find($id);
			if($this->brand_logo){
				$ee=$this->brand_logo;
				if(file_exists($this-band_logo)){
					unlink($this->band_logo);
				}
			}	
		}
		
		
	
}